package gui;

import javax.swing.JPanel;

import com.jgoodies.forms.layout.FormLayout;
import com.jgoodies.forms.layout.ColumnSpec;
import com.jgoodies.forms.layout.RowSpec;
import com.jgoodies.forms.factories.FormFactory;
import javax.swing.JLabel;
import javax.swing.JScrollPane;
import javax.swing.JList;
import javax.swing.JButton;
import javax.swing.UIManager;

public class AppDetailsStoryManager extends JPanel {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 3532086094480804100L;
	private final JPanel panel_1 = new JPanel();
	private final JLabel lblNotes = new JLabel("Notes");
	private final JScrollPane scrollPaneNotes = new JScrollPane();
	private final JList listNotes = new JList();
	private final JPanel panel_2 = new JPanel();
	private final JButton btnDeleteNote = new JButton("Delete");
	private final JButton btnNewNote = new JButton("Create");
	private final JButton btnEditNote = new JButton("Edit");
	
	
	/**
	 * Create the panel.
	 */
	public AppDetailsStoryManager() {
		setBackground(UIManager.getColor("Button.background"));
		setLayout(new FormLayout(new ColumnSpec[] {
				ColumnSpec.decode("128px:grow"),},
			new RowSpec[] {
				FormFactory.RELATED_GAP_ROWSPEC,
				FormFactory.DEFAULT_ROWSPEC,
				FormFactory.RELATED_GAP_ROWSPEC,
				RowSpec.decode("max(200px;default)"),
				FormFactory.RELATED_GAP_ROWSPEC,
				FormFactory.DEFAULT_ROWSPEC,}));
		panel_1.setBorder(null);
		
		add(panel_1, "1, 2, fill, fill");
		panel_1.setLayout(new FormLayout(new ColumnSpec[] {
				FormFactory.RELATED_GAP_COLSPEC,
				FormFactory.DEFAULT_COLSPEC,
				FormFactory.RELATED_GAP_COLSPEC,
				FormFactory.DEFAULT_COLSPEC,},
			new RowSpec[] {
				FormFactory.RELATED_GAP_ROWSPEC,
				FormFactory.DEFAULT_ROWSPEC,}));
		
		panel_1.add(lblNotes, "2, 2");
		
		add(scrollPaneNotes, "1, 4, fill, fill");
		listNotes.setBorder(null);
		
		scrollPaneNotes.setViewportView(listNotes);
		panel_2.setBorder(null);
		
		add(panel_2, "1, 6, center, fill");
		
		panel_2.add(btnNewNote);
		
		panel_2.add(btnEditNote);
		
		panel_2.add(btnDeleteNote);

	}
}
